﻿//MIT License
//Copyright (c) 2024 nuaazgg, Nanjing University of Aeronautics and Astronautics(NUAA)

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class InitScript : MonoBehaviour
{
    public TMP_InputField IPText;
    public TMP_InputField COMText;
    public TMP_Dropdown dropdown;
    public RobotControlScript controlScript;

    private void Start()
    {
        Application.targetFrameRate = 30;
    }
    public void OnConnected()
    {
        string ip, com;
        bool isSVHorInspire;
        ip = IPText.text;
        com = COMText.text;
        isSVHorInspire = dropdown.captionText.text.Equals("雄克");
        controlScript.Init(com, ip, isSVHorInspire);
    }

    public void OnDisconnected()
    {
        controlScript.OnDisconnected();
    }

}
